package week_home_work02;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/23
 */
public class Demo44 {
    public static void main(String[] args) {
        //计算一个正整数n的所有因子并输出。
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数字:");
        int num = sc.nextInt();
        for (int i = 1; i <= num ; i++) {
            if (num % i == 0){
                System.out.print(i+"\t");
            }
        }
    }
}
